package com.ruoyi.system.service.impl;

import java.util.Date;
import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.BasicPushConfigMapper;
import com.ruoyi.system.domain.BasicPushConfig;
import com.ruoyi.system.service.IBasicPushConfigService;

/**
 * 推送配置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class BasicPushConfigServiceImpl implements IBasicPushConfigService 
{
    @Autowired
    private BasicPushConfigMapper basicPushConfigMapper;

    /**
     * 查询推送配置
     * 
     * @param pushConfigId 推送配置主键
     * @return 推送配置
     */
    @Override
    public BasicPushConfig selectBasicPushConfigByPushConfigId(Long pushConfigId)
    {
        return basicPushConfigMapper.selectBasicPushConfigByPushConfigId(pushConfigId);
    }

    /**
     * 查询推送配置列表
     * 
     * @param basicPushConfig 推送配置
     * @return 推送配置
     */
    @Override
    public List<BasicPushConfig> selectBasicPushConfigList(BasicPushConfig basicPushConfig)
    {
        return basicPushConfigMapper.selectBasicPushConfigList(basicPushConfig);
    }

    /**
     * 新增推送配置
     * 
     * @param basicPushConfig 推送配置
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertBasicPushConfig(BasicPushConfig basicPushConfig)
    {
        return basicPushConfigMapper.insertBasicPushConfig(basicPushConfig);
    }

    /**
     * 修改推送配置
     * 
     * @param basicPushConfig 推送配置
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateBasicPushConfig(BasicPushConfig basicPushConfig)
    {
        return basicPushConfigMapper.updateBasicPushConfig(basicPushConfig);
    }

    /**
     * 批量删除推送配置
     * 
     * @param pushConfigIds 需要删除的推送配置主键
     * @return 结果
     */
    @Override
    public int deleteBasicPushConfigByPushConfigIds(Long[] pushConfigIds)
    {
        return basicPushConfigMapper.deleteBasicPushConfigByPushConfigIds(pushConfigIds);
    }

    /**
     * 删除推送配置信息
     * 
     * @param pushConfigId 推送配置主键
     * @return 结果
     */
    @Override
    public int deleteBasicPushConfigByPushConfigId(Long pushConfigId)
    {
        return basicPushConfigMapper.deleteBasicPushConfigByPushConfigId(pushConfigId);
    }
}
